import http from '@/util/http'

export function articleTags (id) {
  return http.get(`/article/tags?id=${id}`)
}

export function delArticle (id) {
  return http.delete(`/articles?id=${id}`)
}

export function articleList (search, current, pageSize) {
  return http.post(`/article/get?pageNo=${current}&pageSize=${pageSize}`, search)
}

export function addArticle (data) {
  return http.post('/articles', data)
}

export function updateArticle (data) {
  return http.put('/articles', data)
}

export function articleTransfer () {
  return http.get('/article/transfer')
}

export function getArticle (id) {
  return http.get(`/articles?id=${id}`)
}
